import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    nav: []
  },
  getters: {
  },
  mutations: {
    SETNAV(state, data) {
      state.nav = data;
    },
    CLEARNAV(state) {
      state.nav = [];
    }
  },
  actions: { // 管理mutations
    SETNAV({ commit }, data) {
      commit('SETNAV', data)
    },
    CLEARNAV({ commit }) {
      commit('CLEARNAV')
    }
  },
  modules: {
  }
})
